package com.onesports.intelligent.k12.polarlight.domain.entity.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.onesports.framework.kit.common.valid.Length;
import com.onesports.framework.kit.common.valid.NotEmpty;
import com.onesports.intelligent.k12.polarlight.common.domain.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 菜单权限表
 *
 * @TableName sys_menu
 */
@EqualsAndHashCode(callSuper = false)
@TableName("sys_menu")
@Data
public class Menu extends BaseEntity implements Serializable {


    /**
     * 按钮编码:ADD,EDIT,VIEW,DELETE;
     */
    private String buttonCode;


    /**
     * 描述
     */
    private String description;


    /***
     * icon
     */
    private String icon;


    /**
     * menuCode
     */
    private String menuCode;


    private Integer menuLevel;


    private Integer menuType;

    @TableField("system_code")
    private String systemCode;
    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称", required = true)
    @NotEmpty(message = "请输入菜单名称")
    @Length(max = 20, message = "菜单名称字数最大支持20个字")
    @TableField("menu_name")
    private String menuName;

    /**
     * 父id
     */
    @TableField("parent_id")
    @ApiModelProperty(value = "父id")
    private String parentId;

    /**
     * 功能菜单url
     */
    @TableField("router")
    @ApiModelProperty(value = "菜单地址", required = true)
    @Length(max = 100, message = "菜单地址字数最大支持100个字")
    private String router;

    /**
     * 排序
     */
    @TableField("sort")
    @ApiModelProperty(value = "排序", required = true)
    private Long sort;


    @TableField("menu_uri")
    private String menuUri;


    @TableField(exist = false)
    private String roleId;

    /**
     * 是否首页菜单
     */
    @TableField("is_home_menu")
    private Boolean isHomeMenu;
    /**
     * 首页菜单排序
     */
    @TableField("home_menu_sort")
    private Integer homeMenuSort;



    /**
     * 菜单名称
     */
    @TableField("home_menu_name")
    private String homeMenuName;
    private static final long serialVersionUID = 1L;

}